var city = [{
		"name": "广东省",
		"info": ['广州市', '深圳市', '佛山市', '珠海市']
	},
	{
		"name": "四川省",
		"info": ['成都市', '德阳市', '绵阳市', '广元市']
	},
	{
		"name": "云南省",
		"info": ['昆明市', '大理市', '丽江市']
	},
	{
		"name": "贵州省",
		"info": ['贵阳市', '遵义市']
	}
];
window.onload = function () {
	for (var i in city) {
		document.getElementById("province").innerHTML += "<option>" + city[i].name + "</option>"
	}

}

function loadCity() {
	var s = document.getElementById("province");
	var a = s.selectedIndex;
	var ct = document.getElementById("city");
	ct.length = 0;
	if (a == 0) {
		ct.innerHTML += "<option>--请选择--</option>";
	} else {
		a = a - 1;
		ct.innerHTML += "<option>--请选择--</option>";
		var v = 0;
		for (var i = 0; i < city[a].info.length; i++) {
			ct.innerHTML += "<option>" + city[a].info[v] + "</option>";
			v++
		}
	}
}